﻿using System;
using System.IO;
using System.Security;
using System.Windows.Forms;
using Microsoft.Win32;

namespace SynergyLib.Friendly
{
    public class FileGetter
    {
        private static string WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString();
        private static DirectoryInfo Dir = new DirectoryInfo(WorkingDirectory);
        
                
        /// <summary>
        /// Returns the selected directory as a string;
        /// </summary>
        /// <param name="newDirectory"></param>
        public static string ChangeDirectory()
        {
            //System.Windows.MessageBox.Show(Environment.SpecialFolder.LocalizedResources.ToString());
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            fbd.ShowNewFolderButton = false;            
            DialogResult Result = fbd.ShowDialog();

            if (Result == DialogResult.OK)
            {
                Dir = new DirectoryInfo(fbd.SelectedPath);
                return fbd.SelectedPath.ToString();
            }
            return "Directory was not selected";
        }

        public static FileInfo[] GetFilesList()
        { 
            return Dir.GetFiles();
        }
        public static void GetResourcesList()
        {
            //Environment.SpecialFolder.LocalizedResources.ToString();          
        }
        public void get()
        { 
        
        }
    }
}
